/**
 * COPYRIGHT HangZhou Trustway Technology Company Limited
 * All right reserved.
 */
package com.robam.cloud.apicenter.controller;

import com.robam.cloud.apicenter.service.SysDictService;
import com.robam.cloud.common.bean.apicenter.dto.SysDictValueDto;
import com.robam.cloud.common.bean.restful.entity.RespMsg;
import com.robam.cloud.log.annotation.OperationLogRecord;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description
 * @Author 薛铁琪
 * @CreateTime 2020-07-31 14:25
 * @Version 1.0
 */
@RestController
@RequestMapping("/apiCenter/")
public class SysDictController {
    @Autowired
    SysDictService sysDictService;

    @ApiOperation(
            value = "查询字典值",
            notes = "查询字典值")
    @OperationLogRecord(
            describe = "查询字典值",
            modularCode = "/apiCenter/getSysDictValueByType",
            operationLevel = OperationLogRecord.OperationLevel.OTHER)
    @RequestMapping(
            value = "/getSysDictValueByType",
            method = RequestMethod.GET)
    RespMsg<List<SysDictValueDto>> getSysDictValueByType(@RequestParam String dmlb) {
        return RespMsg.success(sysDictService.getSysDictValueDtoByType(dmlb));
    }
}
